
Blockly.Blocks['test'] = {
  init: function() {
    this.appendDummyInput()
        .appendField("yaw");
    this.appendDummyInput()
        .appendField(new Blockly.FieldTextInput("0"), "value1");
    this.setInputsInline(true);
    this.setPreviousStatement(true, null);
    this.setNextStatement(true, null);
    this.setColour(120);
    this.setTooltip('');
    this.setHelpUrl('http://www.example.com/');
  }
};

Blockly.JavaScript['test'] = function(block) {
  var text_value1 = block.getFieldValue('value1');
  // TODO: Assemble JavaScript into code variable.
  var code = 'fuck u\n' + text_value1;
  return code;
};

Blockly.Blocks['feiji'] = {
  init: function() {
    this.appendDummyInput()
        .appendField("aaa");
    this.appendDummyInput()
        .appendField(new Blockly.FieldTextInput("0"), "value1");
    this.setInputsInline(true);
    this.setPreviousStatement(true, null);
    this.setNextStatement(true, null);
    this.setColour(120);
    this.setTooltip('');
    this.setHelpUrl('http://www.example.com/');
  }
};

Blockly.Python['feiji'] = function(block) {
  var text_value1 = block.getFieldValue('value1');
  // TODO: Assemble Python into code variable.
  var code = '...\n';
  return code;
};